(global.webpackJsonp = global.webpackJsonp || []).push([
  ["pagesPluginShop/register/register"], {
    "0344": function (e, i, a) {
      (function (m) {
        Object.defineProperty(i, "__esModule", {
          value: !0
        }), i.default = void 0, a("2f62");
        var e, n = (e = a("3584")) && e.__esModule ? e : {
          default: e
        };
        var o = a("f571"),
          t = {
            data: function () {
              return {
                $imgurl: this.$imgurl,
                needAuth: !1,
                needBind: !1,
                page_signs: "/pagesPluginShop/shop/shop",
                imgUrls: [],
                indicatorDots: !1,
                autoplay: !1,
                interval: 5e3,
                duration: 1e3,
                check: 0,
                yyzz: "",
                logo: "",
                avatar: "",
                nickname: "",
                slide: "",
                catename: "请选择所属分类",
                apply_success: !1,
                system_name: "",
                category: [],
                cid: "",
                latlong: "",
                xieyi_block: 0,
                protocol: "",
                h: 1e3,
                username: "",
                password: "",
                name: "",
                tel: "",
                address: "",
                worktime: "",
                intro: ""
              }
            },
            onLoad: function (e) {
              var t = this;
              this._baseMin(this), m.setNavigationBarTitle({
                title: "商户入驻"
              }), m.getStorageSync("suid");
              o.getOpenid(0, function () {
                t.is_apply()
              }, function () {
                t.needAuth = !0
              }, function () {
                t.needBind = !0
              })
            },
            methods: {
              cell: function () {
                this.needAuth = !1
              },
              closeAuth: function () {
                this.needAuth = !1, this.needBind = !0
              },
              closeBind: function () {
                this.needBind = !1, this.vipinfo()
              },
              getSuid: function () {
                if (m.getStorageSync("suid")) return !0;
                return m.getStorageSync("golobeuser") ? this.needBind = !0 : this.needAuth = !0, !1
              },
              is_apply: function () {
                var t = this;
                m.request({
                  url: t.$baseurl + "doPageis_apply",
                  data: {
                    uniacid: t.$uniacid,
                    suid: wx.getStorageSync("suid")
                  },
                  success: function (e) {
                    console.log(e), 1 == e.data.is_apply && m.showModal({
                      title: "提示",
                      showCancel: !1,
                      content: "您已提交申请，请等待管理员审核",
                      success: function (e) {
                        m.redirectTo({
                          url: "/pages/index/index"
                        })
                      }
                    }), 2 == e.data.is_apply && m.redirectTo({
                      url: "/pagesPluginShop/manage_index/manage_index"
                    }), 3 == e.data.is_apply && (m.showModal({
                      title: "提示",
                      showCancel: !1,
                      content: "您的申请未通过，请重新申请！"
                    }), t.getslide_m()), 0 == e.data.is_apply && t.getslide_m()
                  }
                })
              },
              getslide_m: function () {
                var t = this;
                wx.request({
                  url: t.$baseurl + "doPagegetslide_m",
                  data: {
                    uniacid: t.$uniacid
                  },
                  success: function (e) {
                    e.data.data.protocol && (t.protocol = (0, n.default)(e.data.data.protocol)), t.system_name = e.data.data.system_name, t.slide = e.data.data.bg, t.category = e.data.data.category
                  }
                })
              },
              bindPickerChange: function (e) {
                var t = this,
                  n = e.detail.value;
                t.cid = t.category[n].id, t.catename = t.category[n].name
              },
              getLatlong: function () {
                var t = this;
                m.chooseLocation({
                  success: function (e) {
                    t.latlong = Math.floor(1e6 * e.latitude) / 1e6 + "," + Math.floor(1e6 * e.longitude) / 1e6
                  }
                })
              },
              yyzz_upload: function () {
                var n = this,
                  o = n.$baseurl + "wxupimg";
                m.chooseImage({
                  count: 1,
                  sizeType: ["original", "compressed"],
                  sourceType: ["album", "camera"],
                  success: function (e) {
                    m.showLoading({
                      title: "图片上传中"
                    });
                    var t = e.tempFilePaths;
                    m.uploadFile({
                      url: o,
                      formData: {
                        uniacid: n.$uniacid
                      },
                      filePath: t[0],
                      name: "file",
                      success: function (e) {
                        var t = e.data;
                        n.yyzz = t, m.hideLoading()
                      }
                    })
                  }
                })
              },
              logo_upload: function () {
                var n = this,
                  o = n.$baseurl + "wxupimg";
                m.chooseImage({
                  count: 1,
                  sizeType: ["original", "compressed"],
                  sourceType: ["album", "camera"],
                  success: function (e) {
                    m.showLoading({
                      title: "图片上传中"
                    });
                    var t = e.tempFilePaths;
                    m.uploadFile({
                      url: o,
                      formData: {
                        uniacid: n.$uniacid
                      },
                      filePath: t[0],
                      name: "file",
                      success: function (e) {
                        var t = e.data;
                        n.logo = t, m.hideLoading()
                      }
                    })
                  }
                })
              },
              check_change: function () {
                var e = this.check;
                this.check = 0 == e ? 1 : 0
              },
              xieyi_close: function () {
                this.xieyi_block = 0, this.check = 1
              },
              xieyi_hidden: function () {
                this.xieyi_block = 1
              },
              ipt_username: function (e) {
                this.username = e.detail.value
              },
              ipt_password: function (e) {
                this.password = e.detail.value
              },
              ipt_name: function (e) {
                this.name = e.detail.value
              },
              ipt_tel: function (e) {
                this.tel = e.detail.value
              },
              ipt_address: function (e) {
                this.address = e.detail.value
              },
              ipt_worktime: function (e) {
                this.worktime = e.detail.value
              },
              ipt_intro: function (e) {
                this.intro = e.detail.value
              },
              formSubmit2: function (e) {
                if (!this.getSuid()) return !1;
                var t = this;
                if (0 == t.check) return m.showToast({
                  title: "请先阅读协议",
                  icon: "none"
                }), !1;
                var n = {},
                  o = this.username;
                if ("" == o) return m.showModal({
                  title: "提示",
                  content: "请输入登录账号",
                  showCancel: !1
                }), !1;
                n.username = o;
                var i = this.password;
                if ("" == i) return m.showModal({
                  title: "提示",
                  content: "请输入密码",
                  showCancel: !1
                }), !1;
                n.password = i;
                var a = this.cid;
                if (null == a || "" == a) return m.showModal({
                  title: "提示",
                  content: "请选择分类",
                  showCancel: !1
                }), !1;
                n.cid = a;
                var s = this.name;
                if ("" == s) return m.showModal({
                  title: "提示",
                  content: "请输入商户名称",
                  showCancel: !1
                }), !1;
                n.name = s;
                var c = this.tel;
                if ("" == c) return m.showModal({
                  title: "提示",
                  content: "请输入商户电话",
                  showCancel: !1
                }), !1;
                n.tel = c;
                var l = this.address;
                if ("" == l) return m.showModal({
                  title: "提示",
                  content: "请输入商户地址",
                  showCancel: !1
                }), !1;
                n.address = l;
                var r = this.latlong;
                if ("" == r) return m.showModal({
                  title: "提示",
                  content: "请填写经纬度",
                  showCancel: !1
                }), !1;
                n.latlong = r;
                var u = this.worktime;
                if ("" == u) return m.showModal({
                  title: "提示",
                  content: "请输入营业时间",
                  showCancel: !1
                }), !1;
                n.worktime = u;
                var d = this.intro;
                if ("" == d) return m.showModal({
                  title: "提示",
                  content: "请输入一句话简介",
                  showCancel: !1
                }), !1;
                n.intro = d;
                var h = this.yyzz;
                if ("" == h) return m.showModal({
                  title: "提示",
                  content: "请上传营业执照",
                  showCancel: !1
                }), !1;
                n.yyzz = h;
                var f = this.logo;
                if ("" == f) return m.showModal({
                  title: "提示",
                  content: "请上传商户logo",
                  showCancel: !1
                }), !1;
                n.logo = f;
                var g = m.getStorageSync("openid"),
                  p = m.getStorageSync("subscribe");
                if (0 < p.length && "" != p[5].mid) {
                  var w = new Array;
                  w.push(p[5].mid), m.requestSubscribeMessage({
                    tmplIds: w,
                    success: function (e) {
                      m.request({
                        url: t.$baseurl + "doPageshopApply",
                        data: {
                          uniacid: t.$uniacid,
                          suid: m.getStorageSync("suid"),
                          openid: g,
                          source: m.getStorageSync("source"),
                          formdata: JSON.stringify(n),
                          formID: ""
                        },
                        success: function (e) {
                          console.log(e), -1 == e.data.data ? m.showModal({
                            title: "提示",
                            content: "申请失败, 登录账号重复!",
                            showCancel: !1
                          }) : m.showModal({
                            title: "提示",
                            content: "申请成功",
                            showCancel: !1,
                            success: function () {
                              wx.redirectTo({
                                url: "/pages/index/index"
                              })
                            }
                          })
                        }
                      })
                    }
                  })
                } else m.request({
                  url: t.$baseurl + "doPageshopApply",
                  data: {
                    uniacid: t.$uniacid,
                    suid: m.getStorageSync("suid"),
                    openid: g,
                    source: m.getStorageSync("source"),
                    formdata: JSON.stringify(n),
                    formID: ""
                  },
                  success: function (e) {
                    console.log(e), -1 == e.data.data ? m.showModal({
                      title: "提示",
                      content: "申请失败, 登录账号重复!",
                      showCancel: !1
                    }) : m.showModal({
                      title: "提示",
                      content: "申请成功",
                      showCancel: !1,
                      success: function () {
                        wx.redirectTo({
                          url: "/pages/index/index"
                        })
                      }
                    })
                  }
                })
              },
              formSubmit: function (e) {
                if (!this.getSuid()) return !1;
                if (0 == this.check) return m.showToast({
                  title: "请先阅读协议",
                  icon: "none"
                }), !1;
                var t = e.detail.formId,
                  n = e.detail.value;
                if ("" == n.username) return m.showModal({
                  title: "提示",
                  content: "请输入登录账号",
                  showCancel: !1
                }), !1;
                if ("" == n.password) return m.showModal({
                  title: "提示",
                  content: "请输入密码",
                  showCancel: !1
                }), !1;
                if (n.cid = this.cid, null == n.cid || "" == n.cid) return m.showModal({
                  title: "提示",
                  content: "请选择分类",
                  showCancel: !1
                }), !1;
                if ("" == n.name) return m.showModal({
                  title: "提示",
                  content: "请输入商户名称",
                  showCancel: !1
                }), !1;
                if ("" == n.tel) return m.showModal({
                  title: "提示",
                  content: "请输入商户电话",
                  showCancel: !1
                }), !1;
                if ("" == n.address) return m.showModal({
                  title: "提示",
                  content: "请输入商户地址",
                  showCancel: !1
                }), !1;
                if ("" == n.latlong) return m.showModal({
                  title: "提示",
                  content: "请填写经纬度",
                  showCancel: !1
                }), !1;
                if ("" == n.worktime) return m.showModal({
                  title: "提示",
                  content: "请输入营业时间",
                  showCancel: !1
                }), !1;
                if ("" == n.intro) return m.showModal({
                  title: "提示",
                  content: "请输入一句话简介",
                  showCancel: !1
                }), !1;
                if ("" == n.yyzz) return m.showModal({
                  title: "提示",
                  content: "请上传营业执照",
                  showCancel: !1
                }), !1;
                if ("" == n.logo) return m.showModal({
                  title: "提示",
                  content: "请上传商户logo",
                  showCancel: !1
                }), !1;
                var o = m.getStorageSync("openid");
                m.request({
                  url: this.$baseurl + "doPageshopApply",
                  data: {
                    uniacid: this.$uniacid,
                    suid: m.getStorageSync("suid"),
                    openid: o,
                    source: m.getStorageSync("source"),
                    formdata: JSON.stringify(n),
                    formID: t
                  },
                  success: function (e) {
                    console.log(e), -1 == e.data.data ? m.showModal({
                      title: "提示",
                      content: "申请失败, 登录账号重复!",
                      showCancel: !1
                    }) : m.showModal({
                      title: "提示",
                      content: "申请成功",
                      showCancel: !1,
                      success: function () {
                        wx.redirectTo({
                          url: "/pages/index/index"
                        })
                      }
                    })
                  }
                })
              }
            }
          };
        i.default = t
      }).call(this, a("543d").default)
    },
    "0bf1": function (e, t, n) {
      n.r(t);
      var o = n("b406"),
        i = n("841d");
      for (var a in i) "default" !== a && function (e) {
        n.d(t, e, function () {
          return i[e]
        })
      }(a);
      n("0de7");
      var s = n("2877"),
        c = Object(s.a)(i.default, o.a, o.b, !1, null, null, null);
      t.default = c.exports
    },
    "0de7": function (e, t, n) {
      var o = n("1ee5");
      n.n(o).a
    },
    "1ee5": function (e, t, n) {},
    "575b": function (e, t, n) {
      (function (e) {
        function t(e) {
          return e && e.__esModule ? e : {
            default: e
          }
        }
        n("020c"), n("921b"), t(n("66fd")), e(t(n("0bf1")).default)
      }).call(this, n("543d").createPage)
    },
    "841d": function (e, t, n) {
      n.r(t);
      var o = n("0344"),
        i = n.n(o);
      for (var a in o) "default" !== a && function (e) {
        n.d(t, e, function () {
          return o[e]
        })
      }(a);
      t.default = i.a
    },
    b406: function (e, t, n) {
      var o = function () {
          this.$createElement;
          this._self._c
        },
        i = [];
      n.d(t, "a", function () {
        return o
      }), n.d(t, "b", function () {
        return i
      })
    }
  },
  [
    ["575b", "common/runtime", "common/vendor"]
  ]
]);